<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"></base>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
		$(document).ready(function() {
			$('.fancybox').fancybox();
		});
</script>



<script type="text/javascript">
$(window).load(function(){  

$(".item_pic").each(function(){
   	 var width=$(this).width();
	 var height=$(this).height();
	 width=width*0.85;
	 height=height*0.85;
	 $(".item_pic").css("width",width);
	 $(".item_pic").css("height",height);
	});

 })
</script>

<link type="text/css" rel="stylesheet" href="css/bar.css" />
<link type="text/css" rel="stylesheet" href="css/bar_tab.css" />
<link type="text/css" rel="stylesheet" href="css/jquery.fancybox.css" />

<title>二手淘吧</title>
</head>

<body>
	<div id="container">
		<div id="navi_container">
		
			<!--这里是navigation的顶部栏-->
			<div id="navi_top">
				<div class="navi_left">${sessionScope.cityName}站</div>
				<div class="navi_left">网页版</div>
				
				<div class="navi_right">推广使用</div>
				
				
			<c:choose>
               <c:when test="${sessionScope.nickName==null}">
               <div class="navi_right"><a href="#">注册</a></div>
               <div class="navi_right"><a href="user/login_queryLoginPage.action">登录</a></div>
               </c:when>                 
          	  <c:otherwise>
          	  
          	  <div class="navi_right"><a  href="user/PersonSpace_queryMsgStore.action">我的收藏</a></div>
          	  <div class="navi_right"><a href="user/login_doLogout.action">注销</a></div>
          	  <div class="navi_right"><a target="right" href="user/PersonSpace_queryLabelMsg.action">欢迎${sessionScope.nickName}</a></div>
          	 </c:otherwise>
        	</c:choose>
        	
        	
			</div>
			<!--这里是navigation的顶部栏-->
			
			<!--这里是navigation的infor栏-->
			<div id="navigation_infor">
				<div id="logo"><a href="index.jsp"><img src="img/logo.png" width="220" height="77" border="0"/></a></div>
				<div id="search_content">
						<form action="#" method="post" name="search" id="search" >
							<input type="text" size="37" name="search" />
							<input type="submit" value="搜索" id="commomSearch" />
							<input type="submit" value="高级搜索" id="advanceSearch" />
						</form>
				</div>
			</div>
			<!--这里是navigation的infor栏-->
     
			<!--这里是navigation导航栏-->
			<div id="navigation">
				<div class="navigator_space_left"></div>
				<a href="index.action"><div id="nvg0" class="navigator">首页</div></a>
				<c:forEach  var="catagory"  items="${list}"   varStatus="s">
				   <a href="user/publish_queryCataSecondList.action?catagoryId=${catagory.catagoryID}"><div id="nvg${s.index+1}" class="navigator">${catagory.catagoryName}</div></a>
				</c:forEach>
			</div>
			<!--这里是navigation导航栏-->

			
		</div>
		
		<!--顶部类目导航-->
		<div class="category_location">
			<span>首页&gt;&gt;</span><span>二手淘吧</span>
		</div>
		
		
		<div id="content_container">
		
			<!--中间左侧-->
			<div id="content_left">
			
				<div class="item_navi">
				  <c:forEach  var="msg"  items="${page.list}"  begin="1"  end="1">
				      <div class="item_head">${msg.smallName}</div>
				  </c:forEach>
					
					<a href="#"><span style="float:right; margin-right:10px; margin-top:10px;">按照xx</span></a>
					<a href="#"><span style="float:right; margin-right:10px; margin-top:10px;">按发布时间&nbsp;&nbsp;|</span></a>
					<a href="#"><span style="float:right; margin-right:10px; margin-top:10px;">按地区&nbsp;&nbsp;|</span></a>
					<span style="float:right; margin-right:10px; margin-top:10px;">排序结果:</span>
				</div>
				
				<c:forEach  var="msg"  items="${page.list}">
				
			    <!--这里开始是单条记录内容-->
				<div class="item_space">
						<div class="item_logo" style="float:left"></div>
						<span class="item_detail">
							<a href="user/topic_queryTopic.action?topic.topicID=${msg.topicID}">${msg.title}</a>
						</span>
						<span class="time">
						
						<c:choose>
						  <c:when test="${msg.postTime==0}">
						           今天
						  </c:when>
						  <c:otherwise>
						     ${msg.postTime}天前
						  </c:otherwise>
						</c:choose>
						
						</span>
						<span class="reply">${msg.replyNum}条回复</span>
						
						<c:if test="${fn:length(msg.contentImage)>3}">
						   <div>
							<a class="fancybox" href="${msg.contentImage}" data-fancybox-group="gallery" title="点击查看大图">
								<img src="${msg.contentImage}" class="item_pic" />
							</a>
						   </div>
						</c:if>
						
				</div>
				<!--这里开始是单条记录内容-->
				
				</c:forEach>
				
			</div>
			<!--中间左侧-->
			
			<!--中间右侧-->
			<div id="content_right">
			
				<div id="bar_public_notice">
					<div id="bar_public_head">公告栏</div>
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;">
							<li>求购吧须知</li>
							<li>求购吧使用手册</li>
							<li>用户须知</li>
							<li>计算机网络书吧更新</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
							<li>1本吧公告</li>
						</ul>
					</div>
				</div>
				
				<div id="bar_public_notice" style="margin-top:5px; border-top:none">
				
				
				      <div id="bar_public_head">你可能感兴趣的</div>
					
					<div style="height:auto">
						<ul style="height:auto; padding-bottom:5px;">
						
						<c:forEach  var="msg"  items="${msgs}" >
						    <li><a  href="#">${msg.title}</a></li>
						</c:forEach>
						
						</ul>
					</div>
				</div>
				
				<div>
					<div id="barCode_head">我的二维码</div>
						<img src="img/dimensionalbarcode.png" style="padding-left:20px; padding-top:3px"/>
				</div>
				
				
				
				
			</div>
			<!--中间右侧-->
			
			
		</div>
		
		<div class="page">
		    <span class="page_inner">共${page.rowCount}条记录</span>
		    <span class="page_inner">每页${page.pageSize}条记录</span>
		    
		    
		   
		        <span class="page_inner"><a  href="user/topic_cityPages.action?smallId=${smallId}&page.current_page=1">首页</a></span>
		        <span class="page_inner"><a  href="user/topic_cityPages.action?smallId=${smallId}&page.current_page=${page.previousPage}">上一页</a></span>
		        <span class="page_inner"><a  href="user/topic_cityPages.action?smallId=${smallId}&page.current_page=${page.lastPage}">下一页</a></span>
		        <span class="page_inner"><a  href="user/topic_cityPages.action?smallId=${smallId}&page.current_page=${page.pageCount}">尾页</a></span>
		       
		    
			<span class="page_inner">共${page.pageCount}页</span>
		</div>

			<div style="border-bottom:1px solid #CCCCCC"></div>
			<table align="center" width="1002" style="margin:0 auto;font-family:'新宋体';font-size:12px;margin-bottom:20px;margin-top:15px">
				<tr height="10px">
					<td height="20" align="left" style="text-indent:15px;">ICP证粤B2-20090191</td>
					<td height="20" align="left" style="text-indent:15px;">国际联网备案</td>
					<td height="20" align="left" style="text-indent:15px;">北京网络行业协会</td>
					<td height="20" align="left" style="text-indent:15px;">京公网安备110000000013号</td>
				</tr>
				<tr height="10px">
					<td height="20" align="left" style="text-indent:15px;">增值电信业务经营许可证B2-20090058</td>
					<td height="20" align="left" style="text-indent:15px;">违法不良信息举报中心</td>
					<td height="20" align="left" style="text-indent:15px;">网易网站相关资质证明</td>
					<td height="20" align="left" style="text-indent:15px;">举报邮箱：1341212325@qq.com</td>
				</tr>
				<tr height="10px">
					<td height="20" align="left" style="text-indent:15px;">江西师范大学</td>
					<td height="20" align="left" style="text-indent:15px;">江西南昌大学</td>
					<td height="20" align="left" style="text-indent:15px;">江西省文明宣传委员会</td>
					<td height="20" align="left" style="text-indent:15px;">文明办网文明上网举报电话：010-82558163</td>
				</tr>
			</table>
			
			<div id="navigation_bottom">
				<div class="navigator_bottom_space_left"></div>
				<a href="#"><div id="nvg1" class="navigator_bottom">&copy;&nbsp;&nbsp;2013-2014&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg2" class="navigator_bottom"  style="width:120px">江西师大&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg3" class="navigator_bottom" style="padding-left:0px;">简介&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg4"class="navigator_bottom">联系方法&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg5" class="navigator_bottom">招聘信息&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg6" class="navigator_bottom">关于我们&nbsp;&nbsp;|</div></a>
				<a href="#"><div id="nvg7" class="navigator_bottom">建议反馈</div></a>
			</div>

			<div style="height:30px; width:1002px; margin:0 auto"></div>

	</div>
</body>
</html>
